package com.ztgf.search.models.dto;


import com.ztgf.search.models.annotation.ESMappingField;
import com.ztgf.search.models.annotation.ESMappingType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

@Data
@ApiModel(value = "店铺搜索对象", description = "店铺搜索对象")
@ESMappingType(typeName = "shop")
public class EsShopDTO implements Serializable {

    @ApiModelProperty(value = "店铺ID")
    @ESMappingField(fieldName = "id", dataType = "long")
    private Long id;

    @ApiModelProperty(value = "公司名称")
    @ESMappingField(fieldName = "name", dataType = "keyword")
    private String name;

    @ApiModelProperty(value = "店铺logo")
    @ESMappingField(fieldName = "logo")
    private String logo;

    @ApiModelProperty(value = "二级域名")
    @ESMappingField(fieldName = "domain")
    private String domain;

    @ApiModelProperty(value = "店铺二维码")
    @ESMappingField(fieldName = "qrCode")
    private String qrCode;

    @ApiModelProperty(value = "店铺简介")
    @ESMappingField(fieldName = "notes")
    private String notes;

    @ApiModelProperty(value = "所在地区")
    @ESMappingField(fieldName = "areaId")
    private String areaId;

    @ApiModelProperty(value = "地址")
    @ESMappingField(fieldName = "address")
    private String address;

    @ApiModelProperty(value = "店铺类型 0专营店、1专卖店、2旗舰店、3自营店")
    @ESMappingField(fieldName = "type", dataType = "integer")
    private Integer type;

    @ApiModelProperty(value = "店铺类别 0买家，1卖家")
    @ESMappingField(fieldName = "merchantType", dataType = "integer")
    private Integer merchantType;

    @ApiModelProperty(value = "积分")
    @ESMappingField(fieldName = "integral", dataType = "integer")
    private Integer integral;

    @ApiModelProperty(value = "等级")
    @ESMappingField(fieldName = "level", dataType = "integer")
    private Integer level;

    @ApiModelProperty(value = "店铺名称")
    @ESMappingField(fieldName = "shopName", dataType = "keyword")
    private String shopName;

    @ApiModelProperty(value = "店铺名称-使用ik_smart分词")
    @ESMappingField(fieldName = "shopNameIkSmart", isAnalyze = true, setAnalyzer = "ik_smart")
    private String shopNameIkSmart;

    @ApiModelProperty(value = "店铺名称-使用ik_max_word分词")
    @ESMappingField(fieldName = "shopNameIkMaxWord", isAnalyze = true, setAnalyzer = "default")
    private String shopNameIkMaxWord;

    @ApiModelProperty(value = "店铺名称-使用标准分词器")
    @ESMappingField(fieldName = "shop_name_standard", isAnalyze = true, setAnalyzer = "standard")
    private String shop_name_standard;

    @ApiModelProperty(value = "店铺简称")
    @ESMappingField(fieldName = "shopAbbreviation", dataType = "keyword")
    private String shopAbbreviation;

    @ApiModelProperty(value = "店铺简称-使用ik_max_word分词")
    @ESMappingField(fieldName = "shop_abbreviation_ik", isAnalyze = true, setAnalyzer = "default", boost = 3)
    private String shop_abbreviation_ik;

    @ApiModelProperty(value = "店铺简称-使用标准分词器")
    @ESMappingField(fieldName = "shop_abbreviation_standard", isAnalyze = true, setAnalyzer = "standard")
    private String shop_abbreviation_standard;

    @ApiModelProperty(value = "模板ID")
    @ESMappingField(fieldName = "templetId", dataType = "long")
    private Long templetId;

    @ApiModelProperty(value = "买家级别 0普通买家，1高级买家 默认0")
    @ESMappingField(fieldName = "buyerRank", dataType = "integer")
    private Integer buyerRank;

    @ApiModelProperty(value = "被收藏数")
    @ESMappingField(fieldName = "collectNum", dataType = "integer")
    private Integer collectNum;

    @ApiModelProperty(value = "商品总数")
    @ESMappingField(fieldName = "commodityNum", dataType = "integer")
    private Integer commodityNum;

    @ApiModelProperty(value = "是否有新品")
    @ESMappingField(fieldName = "isNew", dataType = "integer")
    private Integer isNew;

    @ApiModelProperty(value = "好评率")
    @ESMappingField(fieldName = "positiveRate", dataType = "keyword")
    private String positiveRate;

    @ApiModelProperty(value = "搜索结果匹配度")
    private float score;
}
